﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media.Animation;

namespace com.superscene.ui
{
    /// <summary></summary>
    public class BaseBehavior : Animatable
    {
        public DependencyObject _element = null;

        public virtual void onAttached()
        {

        }

        public virtual void onDetaching()
        {

        }

        protected override Freezable CreateInstanceCore()
        {
            return (Freezable)Activator.CreateInstance(GetType());
            //return new BaseBehavior();
        }

    }

    public class BaseBehavior<T> : BaseBehavior where T : DependencyObject
    {
        public T element
        {
            get { return _element as T; }
            set { _element = value; }
        }
    }
}
